home *** CD-ROM | disk | FTP | other *** search
Text File | 1985-03-07 | 1.8 KB | 44 lines | [TEXT/EDIT] |
- I have posted to net.sources.mac a copy of yet another Idle desk accessory.
- The features of this one are:
-
- o erases the whole screen and randomly moves an icon around
- o runs during the host application's idle time (ie., does not take over
- the whole machine)
- o exits when you press the mouse button (so long as the cursor is not in
- the menu bar) or if another window becomes active (ie., if you are in
- the Finder and insert a disk)
- o if you hold down the Option key you can see what used to be on the
- screen (it does not save the bits, however, so it relys on the
- application being able to respond to update events)
-
- If you examine the driver you will find the charaters ICN# followed by a
- word containing 3. This is the resource type and ID of the icon that it
- flashes on the screen. You can edit these to customize your desk
- accessory. (For example, display a different icon depending on what
- application is running. If you do this you would want to install the
- driver in the application itself, including the Finder.) Both ICON and
- ICN# resource types will work. If the resource does not exist a square is
- moved around instead.
-
- Implementation Note:
-
- The DA creates a window the size of the screen. It copies the window's
- portRect into its visRgn before drawing, so that it can draw on top of the
- menu bar. It saves the old menu bar and clears the menus to ensure that
- the user cannot pull down a menu. When you hold down the option key it
- repaints the menu bar and shrinks the window down to 0-size.
-
- You can distribute this freely, as long the credit (blame) is properly
- attributed. Report comments/bugs to me.
-
- Enjoy.
-
- Larry Rosenstein
- {dual, nsc, voder, ios}!apple!lsr
- lsr@Apple.CSNET
-
- "Sit back and leave the programming to us"
- -- one of the mottos of the Expandable Application group
- Application group
-
-